<template>
	<!-- 头部导航栏 -->
	<view class="header">
		<uv-icon name="arrow-leftward" bold="true" @click="back"></uv-icon>
		<div class="center">我的礼物</div>
		<view class="right">礼物记录</view>
	</view>
	<!-- 中间礼物部分 -->
	<view id="main" v-for="(item,key) in getGoods" :key="key">
		<view class="card-box">
			<view class="card">
				<image style="width: 200rpx;height: 200rpx;" src="../../static/flower.png" mode=""></image>
				<div>
					<p class="textStyle">{{item.username}}</p>
				</div>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				getGoods: []

			}
		},
		onLoad() {
			this.getList()
		},
		methods: {
			getList() {
				uni.request({
					url: 'http://172.27.6.151:32112/api/get/doctorList',
					method: 'get',
					success: (res) => {
						console.log("礼物数据", res.data.data);
						this.getGoods = res.data.data
					}
				})
			},
			back() {
				uni.reLaunch({
					url: '/pages/HistoricalConsultation/HistoricalConsultation'
				})
			}

		}
	}
</script>

<style>
	.textStyle {
		font-weight: 600;
	}

	.card-box {
		width: 640rpx;
		height: 250rpx;
		background-color: lightpink;
		margin: 25rpx;
		border-radius: 30rpx;
		padding: 30rpx;
	}

	.header {
		margin-top: 120rpx;
		display: flex;
		justify-content: space-between;
		padding-left: 20rpx;

	}

	.right {
		background-color: #fff;
		color: #fff;
	}

	.card {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}



	#main .children {
		width: 96vw;
		margin-left: 15rpx;
		height: 200rpx;
		background-color: pink;
		margin-top: 50rpx;
		display: flex;
		justify-content: space-around;
		line-height: 100rpx;
		border-radius: 15rpx;
	}

	.left {
		width: 100rpx;
		height: 100rpx;
		margin-top: 55rpx;

	}

	.left image {
		width: 100%;
		height: 100%;
		border-radius: 50%;
	}

	.rightt {
		color: #fff
	}

	.name {
		padding-left: 200rpx;
	}
</style>